home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / mail / pp / pp-6.0 / h / adr.h next >
Encoding:
C/C++ Source or Header  |  1991-12-18  |  6.5 KB  |  242 lines

  1. /* adr.h: address structure definition */
  2.  
  3. /*
  4.  * @(#) $Header: /xtel/pp/pp-beta/h/RCS/adr.h,v 6.0 1991/12/18 20:42:44 jpo Rel $
  5.  *
  6.  * $Log: adr.h,v $
  7.  * Revision 6.0  1991/12/18  20:42:44  jpo
  8.  * Release 6.0
  9.  *
  10.  *
  11.  */
  12.  
  13.  
  14.  
  15. #ifndef _H_ADR
  16. #define _H_ADR
  17.  
  18.  
  19. #include "list_rchan.h"
  20. #include "extension.h"
  21. #include "mta.h"
  22. #include "aparse.h"
  23. #include <isode/psap.h>
  24.  
  25. typedef struct ad_redirection {
  26.     struct ad_redirection *rd_next;
  27.     char    *rd_addr;    /* O/R Name */
  28.     char    *rd_dn;        /* Distinguished Name */
  29.     UTC    rd_time;
  30.     int    rd_reason;
  31. #define RDR_RECIP_ASSIGNED     0
  32. #define RDR_ORIG_ASSIGNED    1
  33. #define RDR_MD_ASSIGNED        2
  34. } Redirection;
  35.  
  36. /* Address-types */
  37.  
  38. #define AD_ORIGINATOR                   1
  39. #define AD_RECIPIENT                    2
  40.  
  41. typedef struct    adr_struct {
  42.     int        ad_no;        /* recipient number */
  43.                     /* PP's key to this adr */
  44.  
  45.                     /* Next 3 parms may be modfiied */
  46.                     /* in Q.  Fixed text encoding */
  47.     int        ad_status;    /* recipient status */
  48. #define  AD_STAT_UNKNOWN                0
  49. #define  AD_STAT_PEND                   1
  50. #define  AD_STAT_DRREQUIRED             2       /* DR required */
  51. #define  AD_STAT_DRWRITTEN              3       /* DR written */
  52. #define  AD_STAT_DONE                   4
  53.     int        ad_rcnt;    /* reformatters done count  */
  54.  
  55.     /* -- MTS Service Parms */
  56.  
  57.     char        *ad_value;    /* address-original */
  58.     char        *ad_dn;        /* Directory Distinguished Name */
  59.                     /* QUIPU string encoding */
  60.  
  61.     int        ad_usrreq;    /* user-report-request bit */
  62. #define  AD_USR_NOREPORT                0
  63. #define  AD_USR_BASIC                   1
  64. #define  AD_USR_CONFIRM                 2
  65. #define  AD_USR_NONE                    3
  66.     int        ad_explicitconversion;    /* explicit conversion */
  67. #define AD_EXP_NONE            -1
  68. #define    AD_EXP_IA5_TEXT_TO_TELETEX    0
  69. #define    AD_EXP_TELETEX_TO_TELEX        1
  70. #define    AD_EXP_TELEX_TO_IA5_TEXT    2
  71. #define    AD_EXP_TELEX_TO_TELETEX        3
  72. #define    AD_EXP_TELEX_TO_G4_CLASS_1    4
  73. #define    AD_EXP_TELEX_TO_VIDEOTEX    5
  74. #define    AD_EXP_IA5_TEXT_TO_TELEX    6
  75. #define    AD_EXP_TELEX_TO_G3_FACSIMILE    7
  76. #define    AD_EXP_IA5_TEXT_TO_G3_FACSIMILE    8
  77. #define    AD_EXP_IA5_TEXT_TO_G4_CLASS_1    9
  78. #define    AD_EXP_IA5_TEXT_TO_VIDEOTEX    10
  79. #define    AD_EXP_TELETEX_TO_IA5_TEXT    11
  80. #define    AD_EXP_TELETEX_TO_G3_FACSIMILE    12
  81. #define    AD_EXP_TELETEX_TO_G4_CLASS_1    13
  82. #define    AD_EXP_TELETEX_TO_VIDEOTEX    14
  83. #define    AD_EXP_VIDEOTEX_TO_TELEX    15
  84. #define    AD_EXP_VIDEOTEX_TO_IA5_TEXT    16
  85. #define    AD_EXP_VIDEOTEX_TO_TELETEX    17
  86.  
  87.     int        ad_type;    /* address-type */
  88. #define  AD_X400_TYPE                   1
  89. #define  AD_822_TYPE                    2
  90. #define     AD_ANY_TYPE            3
  91.  
  92.     char        *ad_orig_req_alt; /* originator requested alternate */
  93.                     /* recipient - std encoded */
  94.     char        ad_orig_req_alt_crit;
  95.  
  96. #define AD_RDM_MAX    4
  97.     int        ad_req_del[AD_RDM_MAX];    /* requested delivery method */
  98. #define AD_RDM_NOTUSED  -1
  99. #define AD_RDM_ANY     0
  100. #define AD_RDM_MHS     1
  101. #define AD_RDM_PD    2
  102. #define AD_RDM_TLX    3
  103. #define AD_RDM_TTX    4
  104. #define AD_RDM_G3    5
  105. #define AD_RDM_G4    6
  106. #define AD_RDM_TTY    7
  107. #define AD_RDM_VTX    8
  108.     char        ad_req_del_crit;
  109.  
  110.     char        ad_phys_forward; /* boolean - is physical     */
  111.                     /* forwarding allowed */
  112.     char        ad_phys_forward_crit;
  113.  
  114.     char        ad_phys_fw_ad_req;
  115.     char        ad_phys_fw_ad_crit;
  116.                     /* boolean - request for phys */
  117.                     /* foward address */
  118.  
  119.     int        ad_phys_modes;
  120.     char        ad_phys_modes_crit;
  121. #define AD_PM_ORD    0x1
  122. #define AD_PM_SPEC    0x2
  123. #define AD_PM_EXPR    0x4
  124. #define AD_PM_CNT    0x8
  125. #define AD_PM_CNT_PHONE    0x10
  126. #define AD_PM_CNT_TLX    0x20
  127. #define AD_PM_CNT_TTX    0x40
  128. #define AD_PM_CNT_BUREAU    0x80
  129. #define AD_PM_MAX    0x80
  130.                     
  131.     int        ad_reg_mail_type;
  132.     char        ad_reg_mail_type_crit;
  133. #define AD_RMT_UNSPECIFIED    -1
  134. #define AD_RMT_NON_REG        0
  135. #define AD_RMT_REG        1
  136. #define AD_RMT_PERSON        2
  137.  
  138.     char        *ad_recip_number_for_advice;
  139.     char        ad_recip_number_for_advice_crit;
  140.  
  141.     OID        ad_phys_rendition_attribs;
  142.     char        ad_phys_rendition_attribs_crit;
  143.     
  144.     int        ad_pd_report_request;
  145.     char        ad_pd_report_request_crit;
  146. #define AD_PRR_UNSPECIFIED -1
  147. #define AD_PRR_UNDELIV_PDS    0
  148. #define AD_NTF_PDS        1
  149. #define AD_NTF_MHS        2
  150. #define AD_NTF_BOTH        3
  151.     Redirection    *ad_redirection_history;
  152.     char        ad_redirection_history_crit;
  153.  
  154.     struct qbuf    *ad_message_token;
  155.     char        ad_message_token_crit;
  156.  
  157.     struct qbuf    *ad_content_integrity;
  158.     char        ad_content_integrity_crit;
  159.  
  160.     int         ad_proof_delivery;
  161.     char        ad_proof_delivery_crit;
  162.                 /* boolean.  Is proof of delivery */
  163.                 /* requested */
  164.  
  165.     /* -- MTA Service Params (calculated for MTS AS) */
  166.     
  167.     int        ad_extension;    /* extension-id */
  168.     int        ad_resp;    /* responsibility bit */
  169.     int        ad_mtarreq;    /* mta-report-request bit */
  170. #define  AD_MTA_NONE                    0
  171. #define  AD_MTA_BASIC                   1
  172. #define  AD_MTA_CONFIRM                 2
  173. #define  AD_MTA_AUDIT_CONFIRM           3
  174.  
  175.     /* -- This may be supplied as a hint  but might get changed */
  176.     
  177.     int        ad_subtype;    /* address-subtype */
  178. #define  AD_NOSUBTYPE                   0
  179. #define  AD_JNT                         1
  180. #define  AD_REAL733                     2
  181. #define  AD_REAL822                     3
  182. #define  AD_X400_84            4  /* Use this if compatible */
  183. #define  AD_X400_88            5
  184.  
  185.  
  186.     X400_Extension    *ad_per_recip_ext_list;
  187.                     /* bucket for new and private */
  188.                     /* odds and sods */
  189.  
  190.     /* -- parameters calculated by PP -- */
  191.     /* -- Note: the outbound mta is held in ad_outchan -- */
  192.  
  193.     char        *ad_r400adr;    /* x400-addr */
  194.     char        *ad_r822adr;    /* rfc-addr */
  195.     
  196.     /* -- should only be set for inbound x400 channels -- */
  197.     char        *ad_r400orig;    /* original form of x400 address */
  198.  
  199.     /* -- next two should only be set for -- */
  200.     /* -- unroutable originator addresses -- */
  201.     char        *ad_r400DR;    /* x400 address for DRs */
  202.     char        *ad_r822DR;    /* 822 address for DRs */
  203.  
  204.     char        *ad_content;    /* outgoing content type */
  205.  
  206.     LIST_RCHAN    *ad_fmtchan;    /* reformatting channels */
  207.     LIST_RCHAN    *ad_outchan;    /* outbound channel structure */
  208.     LIST_BPT    *ad_eit;    /* outgoing eit's */
  209.  
  210.  
  211.     /* -- from here onwards extra PP specific info -- */
  212.     /* -- Diagnostics for any address parsing failures -- */
  213.  
  214.     int        ad_parse_stat;    /* address parsing err status */
  215.     char        *ad_parse_message; /* address parsing err message */
  216.     int        ad_reason;    /* DR reason failure */
  217.     int        ad_diagnostic;    /* DR diagnostic code */
  218.     char        *ad_add_info;    /* DR supplementary info */
  219.  
  220.     Aparse        *aparse;    /* parsing bucket */
  221.  
  222.     /* -- Address Control File offsets for fixed length variables -- */
  223.  
  224.     off_t        ad_no_offset;    /* offset param for recip number */
  225.     off_t        ad_stat_offset; /* offset param for recip status */
  226.     off_t        ad_rcnt_offset; /* offset param for reformat next */
  227.  
  228.  
  229.     struct adr_struct   *ad_next;
  230. } ADDR;
  231.  
  232. #define NULLADDR ((ADDR *)0)
  233.  
  234. extern ADDR    *adr_new ();
  235. extern void    adr_init ();
  236. extern void    adr_free ();
  237. extern void    adr_tfree ();
  238. extern void    adr_add ();
  239. extern void    redirection_free ();
  240.  
  241. #endif
  242.